package o;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.RectF;
import androidx.annotation.NonNull;
import java.nio.ByteBuffer;
import java.security.MessageDigest;

public class ckn extends wl {
    private static final byte[] ˋ = "com.huawei.appgallery.foundation.ui.framework.widget.imageview.RoundCornersWithBorderTransformation".getBytes(ˏ);
    private final int ˊ;
    private final int ˎ;
    private final float ॱ;

    public ckn(int i, int i2, float f) {
        aas.ˏ(i > 0, "roundingRadius must be greater than 0.");
        this.ˎ = i;
        this.ˊ = i2;
        this.ॱ = f;
    }

    protected Bitmap ॱ(@NonNull uc ucVar, @NonNull Bitmap bitmap, int i, int i2) {
        Bitmap ॱ = xb.ॱ(ucVar, bitmap, this.ˎ);
        if (this.ॱ > 0.0f) {
            Paint paint = new Paint();
            paint.setColor(this.ˊ);
            paint.setStyle(Style.STROKE);
            paint.setStrokeWidth(this.ॱ);
            paint.setAntiAlias(true);
            RectF rectF = new RectF(this.ॱ / 2.0f, this.ॱ / 2.0f, ((float) ॱ.getWidth()) - (this.ॱ / 2.0f), ((float) ॱ.getHeight()) - (this.ॱ / 2.0f));
            Canvas canvas = new Canvas(ॱ);
            canvas.drawRoundRect(rectF, (float) this.ˎ, (float) this.ˎ, paint);
            canvas.setBitmap(null);
        }
        return ॱ;
    }

    public void ॱ(@NonNull MessageDigest messageDigest) {
        messageDigest.update(ˋ);
        messageDigest.update(ByteBuffer.allocate(12).putInt(this.ˎ).putInt(this.ˊ).putFloat(this.ॱ).array());
    }

    public boolean equals(Object obj) {
        if (!(obj instanceof ckn)) {
            return false;
        }
        ckn o_ckn = (ckn) obj;
        if (this.ˎ == o_ckn.ˎ && this.ॱ == o_ckn.ॱ && this.ˊ == o_ckn.ˊ) {
            return true;
        }
        return false;
    }

    public int hashCode() {
        return aau.ˋ(this.ॱ, aau.ˏ(this.ˊ, aau.ˏ("com.huawei.appgallery.foundation.ui.framework.widget.imageview.RoundCornersWithBorderTransformation".hashCode(), aau.ˊ(this.ˎ))));
    }
}
